package com.codingapi.websocket.demo.controller;

import com.codingapi.websocket.demo.entity.Message;
import com.codingapi.websocket.demo.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author modificial
 * @date 2018/8/9
 * @company codingApi
 * @description 消息中转发送
 */
@RestController
@RequestMapping("/msg")
public class MessageController {
    @Autowired
    private MessageService messageService;

    @PostMapping("/send")
    public boolean send(@RequestBody Message message) {

        return messageService.send(message);
    }
}
